﻿using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PocketDOHS
{
    public partial class ExamExb : Form
    {
        private TextBox txtFocus;

        public ExamExb()
        {
            InitializeComponent();
        }
                
        private void btnGravar_Click(object sender, EventArgs e)
        {
            if (txtExEb.Text != "")
            {
                Dados.Guia.AvaliacaoClinica.ExameExtraBucal = txtExEb.Text;
                FormsMethods.nextForm();
            }
            else
                MessageBox.Show("Preencha Todos os Campos...", "ATENÇÃO!!");
        }

        private void ExamExb_Activated(object sender, EventArgs e)
        {
            if (FormsMethods.Inicializa[FormsMethods.VetIndex])
            {
                Limpar_txt_Form();
                FormsMethods.Inicializa[FormsMethods.VetIndex] = false;
                txtExEb.Focus();
            }
            if (FormsMethods.Altera.ToArray()[FormsMethods.VetIndex])
            {
                FormsMethods.preencheForms();
                FormsMethods.Altera[FormsMethods.VetIndex] = false;
            }
        }

        private void Limpar_txt_Form()
        {
            txtExEb.Text = "";
        }

        private void btnVoltar_Click(object sender, EventArgs e)
        {
            FormsMethods.frmInformGerais.BringToFront();
        }

        #region Changed

        private void txtExEb_GotFocus(object sender, EventArgs e)
        {
            txtFocus = (TextBox)sender;
        }

        private void WriteTextBox(object sender, EventArgs e)
        {
            FormsMethods.WriteTextBox((Button)sender, txtFocus, this);
        }

        #endregion

    }
}